package com.euond.accv.mdm.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.euond.common.domain.AbstractEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@Entity
@Table(name="bas_code_rule_dtl")
@DynamicInsert //该注解会根据属性非空动态生成insert语句
public class BasCodeRuleDtl extends AbstractEntity<Long> implements Serializable{
	private static final long serialVersionUID = 1L;
	
	/**
	 * 编码规则明细ID
	 */
	@Id
	@Column(name="id")
	@GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
	/**
	 * 编码规则编号
	 */
    @Column(name="code_rule_no")
    private String codeRuleNo;
    
	/**
	 * 编码开始位置
	 */
    @Column(name="code_begin_position")
    private Integer codeBeginPosition;
    
	/**
	 * 编码结束位置
	 */
    @Column(name="code_end_position")
    private Integer codeEndPosition;
    
	/**
	 * 字符长度(结束位置-开始位置+1)
	 */
    @Column(name="char_length")
    private Integer charLength;
    
	/**
	 * 编码类型(1=常量 2=取日期 3=取字段 4=流水号 5=手工录入)
	 */
    @Column(name="code_type")
    private Integer codeType;
    
	/**
	 * 常量值(当编码类型为1时可维护)
	 */
    @Column(name="const_value")
    private String constValue;
    
	/**
	 * 日期格式化值(当编码类型为2时可维护)
	 */
    @Column(name="date_format_value")
    private String dateFormatValue;
    
	/**
	 * 字段值(当编码类型为3时可维护，为字段的列名)
	 */
    @Column(name="field_value")
    private String fieldValue;
    
	/**
	 * 字段截取开始位置
	 */
    @Column(name="cut_begin_position")
    private Integer cutBeginPosition;
    
	/**
	 * 字段截取结束位置
	 */
    @Column(name="cut_end_position")
    private Integer cutEndPosition;
    
	/**
	 * 当前流水日期(当编码类型为4时可维护)
	 */
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@Column(name="current_serial_date")
    private Date currentSerialDate;
    
	/**
	 * 当前流水号(当编码类型为4时可维护)
	 */
    @Column(name="current_serial_no")
    private Integer currentSerialNo;
    
	/**
	 * 重置方式(当编码类型为4时可维护 0=永不重置 1=按天重置 2=按月重置 3=按年重置)
	 */
    @Column(name="reset_mode")
    private Integer resetMode;
    
	/**
	 * 补位符
	 */
    @Column(name="pad_char")
    private String padChar;
    
	/**
	 * 排列序号
	 */
    @Column(name="order_no")
    private Integer orderNo;
    
	/**
	 * 状态
	 */
    @Column(name="status")
    private String status;
    
	/**
	 * 备注
	 */
    @Column(name="remarks")
    private String remarks;
    
	/**
	 * 建档人
	 */
    @Column(name="creator")
    private String creator;
    
	/**
	 * 建档时间
	 */
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@Column(name="create_time")
    private Date createTime;
    
	/**
	 * 修改人
	 */
    @Column(name="modifier")
    private String modifier;
    
	/**
	 * 修改时间
	 */
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@Column(name="modify_time")
    private Date modifyTime;
    
    
    
    public void setId(Long id){
    	this.id = id;
    }
    public String getCodeRuleNo(){
    	return this.codeRuleNo;
    }
    
    public void setCodeRuleNo(String codeRuleNo){
    	this.codeRuleNo = codeRuleNo;
    }
    public Integer getCodeBeginPosition(){
    	return this.codeBeginPosition;
    }
    
    public void setCodeBeginPosition(Integer codeBeginPosition){
    	this.codeBeginPosition = codeBeginPosition;
    }
    public Integer getCodeEndPosition(){
    	return this.codeEndPosition;
    }
    
    public void setCodeEndPosition(Integer codeEndPosition){
    	this.codeEndPosition = codeEndPosition;
    }
    public Integer getCharLength(){
    	return this.charLength;
    }
    
    public void setCharLength(Integer charLength){
    	this.charLength = charLength;
    }
    public Integer getCodeType(){
    	return this.codeType;
    }
    
    public void setCodeType(Integer codeType){
    	this.codeType = codeType;
    }
    public String getConstValue(){
    	return this.constValue;
    }
    
    public void setConstValue(String constValue){
    	this.constValue = constValue;
    }
    public String getDateFormatValue(){
    	return this.dateFormatValue;
    }
    
    public void setDateFormatValue(String dateFormatValue){
    	this.dateFormatValue = dateFormatValue;
    }
    public String getFieldValue(){
    	return this.fieldValue;
    }
    
    public void setFieldValue(String fieldValue){
    	this.fieldValue = fieldValue;
    }
    public Integer getCutBeginPosition(){
    	return this.cutBeginPosition;
    }
    
    public void setCutBeginPosition(Integer cutBeginPosition){
    	this.cutBeginPosition = cutBeginPosition;
    }
    public Integer getCutEndPosition(){
    	return this.cutEndPosition;
    }
    
    public void setCutEndPosition(Integer cutEndPosition){
    	this.cutEndPosition = cutEndPosition;
    }
    public Date getCurrentSerialDate(){
    	return this.currentSerialDate;
    }
    
    public void setCurrentSerialDate(Date currentSerialDate){
    	this.currentSerialDate = currentSerialDate;
    }
    public Integer getCurrentSerialNo(){
    	return this.currentSerialNo;
    }
    
    public void setCurrentSerialNo(Integer currentSerialNo){
    	this.currentSerialNo = currentSerialNo;
    }
    public Integer getResetMode(){
    	return this.resetMode;
    }
    
    public void setResetMode(Integer resetMode){
    	this.resetMode = resetMode;
    }

    public String getPadChar() {
        return padChar;
    }

    public void setPadChar(String padChar) {
        this.padChar = padChar;
    }

    public Integer getOrderNo(){
    	return this.orderNo;
    }
    
    public void setOrderNo(Integer orderNo){
    	this.orderNo = orderNo;
    }
    public String getStatus(){
    	return this.status;
    }
    
    public void setStatus(String status){
    	this.status = status;
    }
    public String getRemarks(){
    	return this.remarks;
    }
    
    public void setRemarks(String remarks){
    	this.remarks = remarks;
    }
    public String getCreator(){
    	return this.creator;
    }
    
    public void setCreator(String creator){
    	this.creator = creator;
    }
    public Date getCreateTime(){
    	return this.createTime;
    }
    
    public void setCreateTime(Date createTime){
    	this.createTime = createTime;
    }
    public String getModifier(){
    	return this.modifier;
    }
    
    public void setModifier(String modifier){
    	this.modifier = modifier;
    }
    public Date getModifyTime(){
    	return this.modifyTime;
    }
    
    public void setModifyTime(Date modifyTime){
    	this.modifyTime = modifyTime;
    }
    
    @Override
	public Long getId() {
		// TODO Auto-generated method stub
		return this.id;
	}
}
